﻿
using System;
using System.Collections;

namespace Xacml.Core.Context
{
  public class SubjectCollection : SubjectCollectionReadWrite
  {
    public SubjectCollection()
    {
    }

    public SubjectCollection(SubjectCollectionReadWrite items)
    {
      foreach (SubjectElementReadWrite elementReadWrite in (CollectionBase) items)
        this.Add(elementReadWrite);
    }

    public override int Add(SubjectElementReadWrite value)
    {
      return this.List.Add((object) new SubjectElement(value.SubjectCategory, new AttributeCollection(value.Attributes), value.SchemaVersion));
    }

    public override void Clear()
    {
      throw new NotSupportedException();
    }

    public override void RemoveAt(int index)
    {
      throw new NotSupportedException();
    }
  }
}
